﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Collections;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x020000C9 RID: 201
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class Avatar : IMessage<Avatar>, IMessage, IEquatable<Avatar>, IDeepCloneable<Avatar>, IBufferMessage
	{
		// Token: 0x17000286 RID: 646
		// (get) Token: 0x060008ED RID: 2285 RVA: 0x000197C5 File Offset: 0x000179C5
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<Avatar> Parser
		{
			get
			{
				return Avatar._parser;
			}
		}

		// Token: 0x17000287 RID: 647
		// (get) Token: 0x060008EE RID: 2286 RVA: 0x000197CC File Offset: 0x000179CC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return AvatarReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x17000288 RID: 648
		// (get) Token: 0x060008EF RID: 2287 RVA: 0x000197DE File Offset: 0x000179DE
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return Avatar.Descriptor;
			}
		}

		// Token: 0x060008F0 RID: 2288 RVA: 0x000197E5 File Offset: 0x000179E5
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public Avatar()
		{
		}

		// Token: 0x060008F1 RID: 2289 RVA: 0x00019810 File Offset: 0x00017A10
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public Avatar(Avatar other) : this()
		{
			this.promotion_ = other.promotion_;
			this.rank_ = other.rank_;
			this.dressedSkinId_ = other.dressedSkinId_;
			this.equipmentUniqueId_ = other.equipmentUniqueId_;
			this.exp_ = other.exp_;
			this.firstMetTimeStamp_ = other.firstMetTimeStamp_;
			this.skilltreeList_ = other.skilltreeList_.Clone();
			this.baseAvatarId_ = other.baseAvatarId_;
			this.isMarked_ = other.isMarked_;
			this.hasTakenPromotionRewardList_ = other.hasTakenPromotionRewardList_.Clone();
			this.level_ = other.level_;
			this.equipRelicList_ = other.equipRelicList_.Clone();
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x060008F2 RID: 2290 RVA: 0x000198D3 File Offset: 0x00017AD3
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public Avatar Clone()
		{
			return new Avatar(this);
		}

		// Token: 0x17000289 RID: 649
		// (get) Token: 0x060008F3 RID: 2291 RVA: 0x000198DB File Offset: 0x00017ADB
		// (set) Token: 0x060008F4 RID: 2292 RVA: 0x000198E3 File Offset: 0x00017AE3
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Promotion
		{
			get
			{
				return this.promotion_;
			}
			set
			{
				this.promotion_ = value;
			}
		}

		// Token: 0x1700028A RID: 650
		// (get) Token: 0x060008F5 RID: 2293 RVA: 0x000198EC File Offset: 0x00017AEC
		// (set) Token: 0x060008F6 RID: 2294 RVA: 0x000198F4 File Offset: 0x00017AF4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Rank
		{
			get
			{
				return this.rank_;
			}
			set
			{
				this.rank_ = value;
			}
		}

		// Token: 0x1700028B RID: 651
		// (get) Token: 0x060008F7 RID: 2295 RVA: 0x000198FD File Offset: 0x00017AFD
		// (set) Token: 0x060008F8 RID: 2296 RVA: 0x00019905 File Offset: 0x00017B05
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint DressedSkinId
		{
			get
			{
				return this.dressedSkinId_;
			}
			set
			{
				this.dressedSkinId_ = value;
			}
		}

		// Token: 0x1700028C RID: 652
		// (get) Token: 0x060008F9 RID: 2297 RVA: 0x0001990E File Offset: 0x00017B0E
		// (set) Token: 0x060008FA RID: 2298 RVA: 0x00019916 File Offset: 0x00017B16
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint EquipmentUniqueId
		{
			get
			{
				return this.equipmentUniqueId_;
			}
			set
			{
				this.equipmentUniqueId_ = value;
			}
		}

		// Token: 0x1700028D RID: 653
		// (get) Token: 0x060008FB RID: 2299 RVA: 0x0001991F File Offset: 0x00017B1F
		// (set) Token: 0x060008FC RID: 2300 RVA: 0x00019927 File Offset: 0x00017B27
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Exp
		{
			get
			{
				return this.exp_;
			}
			set
			{
				this.exp_ = value;
			}
		}

		// Token: 0x1700028E RID: 654
		// (get) Token: 0x060008FD RID: 2301 RVA: 0x00019930 File Offset: 0x00017B30
		// (set) Token: 0x060008FE RID: 2302 RVA: 0x00019938 File Offset: 0x00017B38
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ulong FirstMetTimeStamp
		{
			get
			{
				return this.firstMetTimeStamp_;
			}
			set
			{
				this.firstMetTimeStamp_ = value;
			}
		}

		// Token: 0x1700028F RID: 655
		// (get) Token: 0x060008FF RID: 2303 RVA: 0x00019941 File Offset: 0x00017B41
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RepeatedField<AvatarSkillTree> SkilltreeList
		{
			get
			{
				return this.skilltreeList_;
			}
		}

		// Token: 0x17000290 RID: 656
		// (get) Token: 0x06000900 RID: 2304 RVA: 0x00019949 File Offset: 0x00017B49
		// (set) Token: 0x06000901 RID: 2305 RVA: 0x00019951 File Offset: 0x00017B51
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint BaseAvatarId
		{
			get
			{
				return this.baseAvatarId_;
			}
			set
			{
				this.baseAvatarId_ = value;
			}
		}

		// Token: 0x17000291 RID: 657
		// (get) Token: 0x06000902 RID: 2306 RVA: 0x0001995A File Offset: 0x00017B5A
		// (set) Token: 0x06000903 RID: 2307 RVA: 0x00019962 File Offset: 0x00017B62
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool IsMarked
		{
			get
			{
				return this.isMarked_;
			}
			set
			{
				this.isMarked_ = value;
			}
		}

		// Token: 0x17000292 RID: 658
		// (get) Token: 0x06000904 RID: 2308 RVA: 0x0001996B File Offset: 0x00017B6B
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RepeatedField<uint> HasTakenPromotionRewardList
		{
			get
			{
				return this.hasTakenPromotionRewardList_;
			}
		}

		// Token: 0x17000293 RID: 659
		// (get) Token: 0x06000905 RID: 2309 RVA: 0x00019973 File Offset: 0x00017B73
		// (set) Token: 0x06000906 RID: 2310 RVA: 0x0001997B File Offset: 0x00017B7B
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Level
		{
			get
			{
				return this.level_;
			}
			set
			{
				this.level_ = value;
			}
		}

		// Token: 0x17000294 RID: 660
		// (get) Token: 0x06000907 RID: 2311 RVA: 0x00019984 File Offset: 0x00017B84
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RepeatedField<EquipRelic> EquipRelicList
		{
			get
			{
				return this.equipRelicList_;
			}
		}

		// Token: 0x06000908 RID: 2312 RVA: 0x0001998C File Offset: 0x00017B8C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as Avatar);
		}

		// Token: 0x06000909 RID: 2313 RVA: 0x0001999C File Offset: 0x00017B9C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(Avatar other)
		{
			return other != null && (other == this || (this.Promotion == other.Promotion && this.Rank == other.Rank && this.DressedSkinId == other.DressedSkinId && this.EquipmentUniqueId == other.EquipmentUniqueId && this.Exp == other.Exp && this.FirstMetTimeStamp == other.FirstMetTimeStamp && this.skilltreeList_.Equals(other.skilltreeList_) && this.BaseAvatarId == other.BaseAvatarId && this.IsMarked == other.IsMarked && this.hasTakenPromotionRewardList_.Equals(other.hasTakenPromotionRewardList_) && this.Level == other.Level && this.equipRelicList_.Equals(other.equipRelicList_) && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x0600090A RID: 2314 RVA: 0x00019A94 File Offset: 0x00017C94
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.Promotion != 0U)
			{
				num ^= this.Promotion.GetHashCode();
			}
			if (this.Rank != 0U)
			{
				num ^= this.Rank.GetHashCode();
			}
			if (this.DressedSkinId != 0U)
			{
				num ^= this.DressedSkinId.GetHashCode();
			}
			if (this.EquipmentUniqueId != 0U)
			{
				num ^= this.EquipmentUniqueId.GetHashCode();
			}
			if (this.Exp != 0U)
			{
				num ^= this.Exp.GetHashCode();
			}
			if (this.FirstMetTimeStamp != 0UL)
			{
				num ^= this.FirstMetTimeStamp.GetHashCode();
			}
			num ^= this.skilltreeList_.GetHashCode();
			if (this.BaseAvatarId != 0U)
			{
				num ^= this.BaseAvatarId.GetHashCode();
			}
			if (this.IsMarked)
			{
				num ^= this.IsMarked.GetHashCode();
			}
			num ^= this.hasTakenPromotionRewardList_.GetHashCode();
			if (this.Level != 0U)
			{
				num ^= this.Level.GetHashCode();
			}
			num ^= this.equipRelicList_.GetHashCode();
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x0600090B RID: 2315 RVA: 0x00019BC5 File Offset: 0x00017DC5
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x0600090C RID: 2316 RVA: 0x00019BCD File Offset: 0x00017DCD
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x0600090D RID: 2317 RVA: 0x00019BD8 File Offset: 0x00017DD8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.EquipmentUniqueId != 0U)
			{
				output.WriteRawTag(8);
				output.WriteUInt32(this.EquipmentUniqueId);
			}
			this.hasTakenPromotionRewardList_.WriteTo(ref output, Avatar._repeated_hasTakenPromotionRewardList_codec);
			if (this.Level != 0U)
			{
				output.WriteRawTag(32);
				output.WriteUInt32(this.Level);
			}
			if (this.IsMarked)
			{
				output.WriteRawTag(40);
				output.WriteBool(this.IsMarked);
			}
			if (this.DressedSkinId != 0U)
			{
				output.WriteRawTag(56);
				output.WriteUInt32(this.DressedSkinId);
			}
			if (this.BaseAvatarId != 0U)
			{
				output.WriteRawTag(64);
				output.WriteUInt32(this.BaseAvatarId);
			}
			this.equipRelicList_.WriteTo(ref output, Avatar._repeated_equipRelicList_codec);
			if (this.Exp != 0U)
			{
				output.WriteRawTag(88);
				output.WriteUInt32(this.Exp);
			}
			if (this.Promotion != 0U)
			{
				output.WriteRawTag(96);
				output.WriteUInt32(this.Promotion);
			}
			if (this.Rank != 0U)
			{
				output.WriteRawTag(104);
				output.WriteUInt32(this.Rank);
			}
			this.skilltreeList_.WriteTo(ref output, Avatar._repeated_skilltreeList_codec);
			if (this.FirstMetTimeStamp != 0UL)
			{
				output.WriteRawTag(120);
				output.WriteUInt64(this.FirstMetTimeStamp);
			}
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x0600090E RID: 2318 RVA: 0x00019D28 File Offset: 0x00017F28
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.Promotion != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Promotion);
			}
			if (this.Rank != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Rank);
			}
			if (this.DressedSkinId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.DressedSkinId);
			}
			if (this.EquipmentUniqueId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.EquipmentUniqueId);
			}
			if (this.Exp != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Exp);
			}
			if (this.FirstMetTimeStamp != 0UL)
			{
				num += 1 + CodedOutputStream.ComputeUInt64Size(this.FirstMetTimeStamp);
			}
			num += this.skilltreeList_.CalculateSize(Avatar._repeated_skilltreeList_codec);
			if (this.BaseAvatarId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.BaseAvatarId);
			}
			if (this.IsMarked)
			{
				num += 2;
			}
			num += this.hasTakenPromotionRewardList_.CalculateSize(Avatar._repeated_hasTakenPromotionRewardList_codec);
			if (this.Level != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Level);
			}
			num += this.equipRelicList_.CalculateSize(Avatar._repeated_equipRelicList_codec);
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x0600090F RID: 2319 RVA: 0x00019E54 File Offset: 0x00018054
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(Avatar other)
		{
			if (other == null)
			{
				return;
			}
			if (other.Promotion != 0U)
			{
				this.Promotion = other.Promotion;
			}
			if (other.Rank != 0U)
			{
				this.Rank = other.Rank;
			}
			if (other.DressedSkinId != 0U)
			{
				this.DressedSkinId = other.DressedSkinId;
			}
			if (other.EquipmentUniqueId != 0U)
			{
				this.EquipmentUniqueId = other.EquipmentUniqueId;
			}
			if (other.Exp != 0U)
			{
				this.Exp = other.Exp;
			}
			if (other.FirstMetTimeStamp != 0UL)
			{
				this.FirstMetTimeStamp = other.FirstMetTimeStamp;
			}
			this.skilltreeList_.Add(other.skilltreeList_);
			if (other.BaseAvatarId != 0U)
			{
				this.BaseAvatarId = other.BaseAvatarId;
			}
			if (other.IsMarked)
			{
				this.IsMarked = other.IsMarked;
			}
			this.hasTakenPromotionRewardList_.Add(other.hasTakenPromotionRewardList_);
			if (other.Level != 0U)
			{
				this.Level = other.Level;
			}
			this.equipRelicList_.Add(other.equipRelicList_);
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x06000910 RID: 2320 RVA: 0x00019F63 File Offset: 0x00018163
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x06000911 RID: 2321 RVA: 0x00019F6C File Offset: 0x0001816C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num <= 56U)
				{
					if (num <= 18U)
					{
						if (num == 8U)
						{
							this.EquipmentUniqueId = input.ReadUInt32();
							continue;
						}
						if (num == 16U || num == 18U)
						{
							this.hasTakenPromotionRewardList_.AddEntriesFrom(ref input, Avatar._repeated_hasTakenPromotionRewardList_codec);
							continue;
						}
					}
					else
					{
						if (num == 32U)
						{
							this.Level = input.ReadUInt32();
							continue;
						}
						if (num == 40U)
						{
							this.IsMarked = input.ReadBool();
							continue;
						}
						if (num == 56U)
						{
							this.DressedSkinId = input.ReadUInt32();
							continue;
						}
					}
				}
				else if (num <= 88U)
				{
					if (num == 64U)
					{
						this.BaseAvatarId = input.ReadUInt32();
						continue;
					}
					if (num == 82U)
					{
						this.equipRelicList_.AddEntriesFrom(ref input, Avatar._repeated_equipRelicList_codec);
						continue;
					}
					if (num == 88U)
					{
						this.Exp = input.ReadUInt32();
						continue;
					}
				}
				else if (num <= 104U)
				{
					if (num == 96U)
					{
						this.Promotion = input.ReadUInt32();
						continue;
					}
					if (num == 104U)
					{
						this.Rank = input.ReadUInt32();
						continue;
					}
				}
				else
				{
					if (num == 114U)
					{
						this.skilltreeList_.AddEntriesFrom(ref input, Avatar._repeated_skilltreeList_codec);
						continue;
					}
					if (num == 120U)
					{
						this.FirstMetTimeStamp = input.ReadUInt64();
						continue;
					}
				}
				this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
			}
		}

		// Token: 0x04000352 RID: 850
		private static readonly MessageParser<Avatar> _parser = new MessageParser<Avatar>(() => new Avatar());

		// Token: 0x04000353 RID: 851
		private UnknownFieldSet _unknownFields;

		// Token: 0x04000354 RID: 852
		public const int PromotionFieldNumber = 12;

		// Token: 0x04000355 RID: 853
		private uint promotion_;

		// Token: 0x04000356 RID: 854
		public const int RankFieldNumber = 13;

		// Token: 0x04000357 RID: 855
		private uint rank_;

		// Token: 0x04000358 RID: 856
		public const int DressedSkinIdFieldNumber = 7;

		// Token: 0x04000359 RID: 857
		private uint dressedSkinId_;

		// Token: 0x0400035A RID: 858
		public const int EquipmentUniqueIdFieldNumber = 1;

		// Token: 0x0400035B RID: 859
		private uint equipmentUniqueId_;

		// Token: 0x0400035C RID: 860
		public const int ExpFieldNumber = 11;

		// Token: 0x0400035D RID: 861
		private uint exp_;

		// Token: 0x0400035E RID: 862
		public const int FirstMetTimeStampFieldNumber = 15;

		// Token: 0x0400035F RID: 863
		private ulong firstMetTimeStamp_;

		// Token: 0x04000360 RID: 864
		public const int SkilltreeListFieldNumber = 14;

		// Token: 0x04000361 RID: 865
		private static readonly FieldCodec<AvatarSkillTree> _repeated_skilltreeList_codec = FieldCodec.ForMessage<AvatarSkillTree>(114U, AvatarSkillTree.Parser);

		// Token: 0x04000362 RID: 866
		private readonly RepeatedField<AvatarSkillTree> skilltreeList_ = new RepeatedField<AvatarSkillTree>();

		// Token: 0x04000363 RID: 867
		public const int BaseAvatarIdFieldNumber = 8;

		// Token: 0x04000364 RID: 868
		private uint baseAvatarId_;

		// Token: 0x04000365 RID: 869
		public const int IsMarkedFieldNumber = 5;

		// Token: 0x04000366 RID: 870
		private bool isMarked_;

		// Token: 0x04000367 RID: 871
		public const int HasTakenPromotionRewardListFieldNumber = 2;

		// Token: 0x04000368 RID: 872
		private static readonly FieldCodec<uint> _repeated_hasTakenPromotionRewardList_codec = FieldCodec.ForUInt32(18U);

		// Token: 0x04000369 RID: 873
		private readonly RepeatedField<uint> hasTakenPromotionRewardList_ = new RepeatedField<uint>();

		// Token: 0x0400036A RID: 874
		public const int LevelFieldNumber = 4;

		// Token: 0x0400036B RID: 875
		private uint level_;

		// Token: 0x0400036C RID: 876
		public const int EquipRelicListFieldNumber = 10;

		// Token: 0x0400036D RID: 877
		private static readonly FieldCodec<EquipRelic> _repeated_equipRelicList_codec = FieldCodec.ForMessage<EquipRelic>(82U, EquipRelic.Parser);

		// Token: 0x0400036E RID: 878
		private readonly RepeatedField<EquipRelic> equipRelicList_ = new RepeatedField<EquipRelic>();
	}
}
